<?php
function ProductInfo($proxy,$sessionId,$id){
    return ($proxy->call ($sessionId, 'catalog_product.info', $id));
}

function MediaCreate($proxy,$sessionId,$urlImageLocal,$id,$name,$label,$posicion){
    $imageData = array(
        'file' => array(
            'name' => $name,
            'content' => base64_encode(file_get_contents($urlImageLocal)),
            'mime'    => 'image/jpeg'
        ),
        'label'    => $label,
        'position' => $posicion,
        'types'    => array('small_image','image','thumbnail'),
        //'types'    => array('image'),
        'exclude'  => 0
    );

    $image_create = $proxy->call($sessionId, 'product_media.create', array($id, $imageData));
    $proxy->call($sessionId, 'product_media.update', array($id, $image_create));
    return $image_create;
}

function MediaList($proxy,$sessionId,$id){
    return ($proxy->call($sessionId, 'product_media.list', $id));
}
?>
